package dfbz.demo01;
/*
* 编程思想：
*     面向过程:强调过程
*     面向对象:强调对象  java是一个面向对对象的语言
* 面向对象的三大特征:封装、继承、多态
*
* 类和对象的关系:
*    类是对一类事物的描述
*         属性:成员变暖
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* */

public class Test01 {
    public static void main(String[] args) {
        animalClass animal=new animalClass();
        animalClass anima2=new animalClass();
        animalClass anima3=new animalClass();
        //给动物的名字取名， 取年龄，  设置牌品
        animal.age=2;
        animal.name="小肥猫1";
        animal.brand="梨花猫1";
        System.out.println(animal.name);
        System.out.println(animal.age);
        System.out.println(animal.brand);
        animal.eat();
        animal.sleep();
        System.out.println("---------------------------");
        anima2.age=3;
        anima2.name="小肥猫2";
        anima2.brand="梨花猫2";
        System.out.println(anima2.name);
        System.out.println(anima2.age);
        System.out.println(anima2.brand);
        anima2.eat();
        anima2.sleep();
        System.out.println("---------------------------");
        anima3.age=4;
        anima3.name="小肥猫3";
        anima3.brand="梨花猫3";
        System.out.println(anima3.name);
        System.out.println(anima3.age);
        System.out.println(anima3.brand);
        anima3.eat();
        anima3.sleep();
        anima3.test();
        int id=20;
        anima3.sleep();
    }
}
